var shi = document.querySelector('.h');
var fen = document.querySelector('.m');
var miao = document.querySelector('.s');

function shijian() {
    var Date1 = new Date();
    // console.log(Date1);
    var h = Date1.getHours();
    var m = Date1.getMinutes();
    var s = Date1.getSeconds();
    h = h < 10 ? '0' + h : h;
    shi.innerHTML = h;
    m = m < 10 ? '0' + m : m;
    fen.innerHTML = m;
    s = s < 10 ? '0' + s : s;
    miao.innerHTML = s;
}
setInterval(shijian, 1000);